const express = require('express')
const Mock = require('mockjs')
const router = express.Router()

// 获取患者信息
router.get('/', (req, res) => {
  const { cardNumber } = req.query
  
  res.json({
    code: 200,
    data: Mock.mock({
      id: '@Integer(1, 2000)',
      'name': '@cname',
      cardNumber,
      idCardType: '身份证',
      idCard: '@string("number", 18)',
      phone: '@string("number", 11)',
      address: '@county(true)'
    })
  })
})

module.exports = router
